package com.frogs.ucenter.dao.ibatis;

import java.util.Map;

import com.frogs.framework.base.dao.ibatis.BaseDaoIbatis;
import com.frogs.framework.util.PageList;
import com.frogs.ucenter.dao.UserMessageDmDao;
import com.frogs.ucenter.entity.UserMessageDm;
import com.frogs.ucenter.entity.UserMessageDmWithContent;
import com.ibatis.sqlmap.client.SqlMapClient;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Required;
import org.springframework.stereotype.Repository;

@Repository("userMessageDmDao")
public class UserMessageDmDaoImpl extends BaseDaoIbatis<UserMessageDm> implements UserMessageDmDao {

    public UserMessageDmDaoImpl() {
        super();
        setNameSpace( "user_message_dm" );
    }

    @Required
    @Autowired
    public void setSqlMapClientAutowired(SqlMapClient sqlMapClient) {
        super.setSqlMapClient( sqlMapClient );
    }

	@Override
	public PageList<UserMessageDmWithContent> selectByMapWithContent(
			Map<String, Object> params, int pageNo, int pageSize) {
		return this.queryforPageList(this.getNameSpace() + ".selectByMapWithContent", params, pageNo, pageSize);
	}

	@Override
	public int selectCountByMapWithContent(Map<String, Object> params) {
		return this.doCount(this.getNameSpace() + ".selectByMapWithContent_count", params);
	}
}